package com.xl.dubbo.demo;

import com.xl.dubbo.demo.service.HelloDubboService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class Consume {

    public static void main(String[] args)throws IOException {
            ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("" +
                    "spring/spring.xml");
            context.start();
            HelloDubboService helloDubboService = (HelloDubboService) context.getBean("helloDubboService");
            for(int i = 0;  i < 10000; i++){
                String greetMessage = helloDubboService.sayHelloWorld();
                System.out.println("Consumer ==> " + greetMessage);
            }

            context.destroy();
    }
}
